<!-- include tpl=head_lay -->
<div class="layui-card">
	<div class="layui-card-header">
		<!-- if $id -->{lang编辑管理员} #{$id}<!-- else -->{lang添加管理员}<!-- /if -->
	</div>
	<form class="layui-form" method="post" onsubmit="return $.admin_admin.save()">
		<div class="layui-card-body">
			<!-- if $id -->
			<input type="hidden" name="id" id="id" value="{$id}" />
			<!-- /if -->
			<div class="layui-form-item">
				<label class="layui-form-label">{lang管理员账号}</label>
				<div class="layui-input-inline" style="width: 450px">
					<input type="text" id="account" required name="account" value="{$rs.account}" autocomplete="off" class="layui-input" />
				</div>
				<div class="layui-form-mid layui-word-aux">
					{lang请填写管理员的账号，建议使用}<span class="layui-bg-red">{lang英文单词，中文或数字}</span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">{lang管理员密码}</label>
				<div class="layui-input-inline" style="width: 450px">
					<input type="password" name="pass" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-form-mid layui-word-aux">
					<!-- if $id -->{lang不修改密码请留空，}<!-- /if -->{lang密码长不能少于4位数，建议使用}<span class="layui-bg-red">{lang数字，字母及下划线}</span>{lang等}
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">{lang管理员邮箱}</label>
				<div class="layui-input-inline" style="width: 450px">
					<input type="text" id="email" name="email" value="{$rs.email}" autocomplete="off" class="layui-input" />
				</div>
				<div class="layui-form-mid layui-word-aux">
					{lang此邮箱可用于接收网站通知信息，请不要和SMTP配置的邮箱一致}
				</div>
			</div>
			<!-- if $popedom.status -->
			<div class="layui-form-item">
				<label class="layui-form-label">{lang状态}</label>
				<div class="layui-input-inline" style="min-width: 300px;">
					<input type="radio" name="status" value="1" title="{lang启用}"{if $rs.status} checked{/if} />
					<input type="radio" name="status" value="0" title="{lang禁用}"{if !$rs.status} checked{/if}>
				</div>
				<div class="layui-form-mid layui-word-aux">
					{lang设置该管理员是否启用}
				</div>
			</div>
			<!-- /if -->
			<!-- if $session.admin_rs.if_system -->
			<div class="layui-form-item">
				<label class="layui-form-label">{lang管理员级别}</label>
				<div class="layui-input-inline" style="min-width: 300px;">
					<input type="radio" name="if_system" id="if_system_1" title="{lang系统管理员}" value="1"{if $rs.if_system} checked{/if} onclick="$.admin_admin.if_system(1)" />
					<input type="radio" name="if_system" id="if_system_0" title="{lang普通管理员}" value="0"{if !$rs.if_system} checked{/if} onclick="$.admin_admin.if_system(0)" />
				</div>
				<div class="layui-form-mid layui-word-aux">
					{lang系统管理员是最高级别管理也是开发管理员，可管理整个平台所有功能}
				</div>
			</div>
			<!-- else -->
			<div class="layui-form-item">
				<label class="layui-form-label">{lang管理员级别}</label>
				<div class="layui-input-inline" style="width: 300px;">
					<input type="radio" name="if_system" id="if_system_0" title="{lang普通管理员}" value="0"{if !$rs.if_system} checked{/if} onclick="admin_system(0)" />
				</div>
				<div class="layui-form-mid layui-word-aux">
					{lang您只能添加普通管理员信息}
				</div>
			</div>
			<!-- /if -->
			<div id="sysmenu_html" {if $rs.if_system} class="hide"{/if}>
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-header layui-bg-cyan">
							{lang功能权限分配}
						</div>
						<div class="layui-card-body">
							<!-- loop from=$syslist key=$key value=$value -->
							<div class="layui-col-md12">
								<div class="layui-card" id="mlist_{$value.id}">
									<div class="layui-card-header">
										{$value.title}
										<div class="layui-btn-group fr">
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全选}" onclick="$.input.checkbox_all('mlist_{$value.id}')" />
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全不选}" onclick="$.input.checkbox_none('mlist_{$value.id}')" />
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang反选}" onclick="$.input.checkbox_anti('mlist_{$value.id}')" />
										</div>
									</div>
									<div class="layui-card-body">
										<!-- loop from=$value.sublist key=$k value=$v -->
										<!-- if $v.appfile != 'list' && $v.appfile != 'admin' -->
										<div class="layui-form-item" id="mlist_{$v.id}">
											<label class="layui-form-label">{$v.space}{$v.title}</label>
											<div class="layui-input-inline" style="width: auto">
												<div class="layui-btn-group">
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全选}" onclick="$.input.checkbox_all('mlist_{$v.id}')" />
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全不选}" onclick="$.input.checkbox_none('mlist_{$v.id}')" />
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang反选}" onclick="$.input.checkbox_anti('mlist_{$v.id}')" />
												</div>
												<!-- if $glist[$v['id']] -->
												<!-- loop from=$glist[$v['id']] key=$kk value=$vv -->
												<input type="checkbox" name="popedom[]" value="{$vv.id}" {if $plist && in_array($vv.id,$plist)} checked{/if} title="{func P_Lang $vv.title}">
												<!-- /loop -->
												<!-- /if -->
											</div>
										</div>
										<!-- /if -->
										<!-- /loop -->
									</div>
								</div>
							</div>
							<!-- /loop -->
						</div>
					</div>
				</div>
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-header layui-bg-cyan">
							{lang内容配置}
						</div>
						<div class="layui-card-body">
							<!-- loop from=$sitelist key=$key value=$value -->
							<div class="layui-col-md12">
								<div class="layui-card" id="site_{$value.id}">
									<div class="layui-card-header">
										{$value.title}
										<div class="layui-btn-group fr">
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全选}" onclick="$.input.checkbox_all('site_{$value.id}')" />
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全不选}" onclick="$.input.checkbox_none('site_{$value.id}')" />
											<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang反选}" onclick="$.input.checkbox_anti('site_{$value.id}')" />
										</div>
									</div>
									<div class="layui-card-body">
										<!-- loop from=$value.sonlist key=$k value=$v -->
										<div class="layui-form-item" id="site_p_{$v.id}">
											<label class="layui-form-label">{$v.space}{$v.title}</label>
											<div class="layui-input-inline" style="width: auto">
												<div class="layui-btn-group">
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全选}" onclick="$.input.checkbox_all('site_p_{$v.id}')" />
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang全不选}" onclick="$.input.checkbox_none('site_p_{$v.id}')" />
													<input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="{lang反选}" onclick="$.input.checkbox_anti('site_p_{$v.id}')" />
												</div>
												<!-- loop from=$v._popedom key=$kk value=$vv -->
												<input type="checkbox" name="popedom[]" value="{$vv.id}" {if $plist && in_array($vv.id,$plist)} checked{/if} title="{func P_Lang $vv.title}">
												<!-- /loop -->
											</div>
										</div>
										<!-- /loop -->
									</div>
								</div>
							</div>
							<!-- /loop -->
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block" style="padding:20px 45px;">
				<input type="submit" value="{lang提交保存}" class="layui-btn" />
				<button type="reset" class="layui-btn layui-btn-primary">{lang重置}</button>
			</div>
		</div>
	</form>
</div>
<!-- include tpl=foot_lay -->